import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant';
import 'vant/lib/index.css';
import 'amfe-flexible/index.js'
import BaiduMap from 'vue-baidu-map'
import { post, get } from "./config/axios";

Vue.prototype.$get = get;
Vue.prototype.$post = post;
Vue.use(BaiduMap, {
  ak: 'u5IuTlLS1wqIAllvriSXTTRQM0NDvyPX'		//使用申请的百度地图秘钥
})
Vue.use(Vant);
Vue.config.productionTip = false

// 根据路由设置标题
router.beforeEach((to, from, next) => {
  /*路由发生改变修改页面的title */
  // let userinfos = JSON.parse(sessionStorage.getItem('userinfos'))
  
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next();
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
